<template>
	<view class="withdrawResult">
		<u-navbar title="提现明细"></u-navbar>
		<view class="resultbox">
			<view class="result" v-if="item.istrue">
				<u-icon name="checkmark-circle-fill" color="#F2682C" :size="104"></u-icon>
				<view class="title">提现申请成功</view>
				<view class="" style="color: #919191;font-size: 28rpx;">预计24小时内到账，请注意查收</view>
			</view>
			<view v-else class="result">
				<u-icon name="close-circle-fill" color="#919191" :size="104"></u-icon>
				<view class="title">申请提现失败</view>
				<view class="" style="color: #919191;font-size: 28rpx;">请联系客服处理</view>
			</view>
		</view>
		<view class="info">
			<view class="title" style="margin-bottom: 18rpx;">提现详情</view>
			<u-divider bg-color="#E9E9E9" style="padding: 18rpx 0;"></u-divider>
			<view class="infodata u-flex u-row-between u-col-center">
				<text class="left">支付宝账号</text>
				<text class="right">{{ item.user }}</text>
			</view>
			<view class="infodata u-flex u-row-between u-col-center">
				<text class="left">提现金额</text>
				<text class="right">{{ item.price }}</text>
			</view>
		</view>
		<view class="botfixed"><text style="color: #096DD9;" @click="docheckrecord">查看提现明细</text></view>
	</view>
</template>

<script>
export default {
	name: 'withdrawResult',
	data() {
		return {
			item: {
				price: 0,
				user: '',
				istrue: true
			}
		};
	},
	//实例创建完成后被立即调用
	created() {},
	onLoad(option) {
		this.item = JSON.parse(decodeURIComponent(option.item));
	},
	//挂载开始之前被调用
	beforeMount() {},
	onPullDownRefresh() {
		//监听下拉刷新动作的执行方法，每次手动下拉刷新都会执行一次
		console.log('refresh');
		setTimeout(function() {
			uni.stopPullDownRefresh(); //停止下拉刷新动画
		}, 1000);
	},
	//初次渲染完成
	onReady() {},
	//全局只触发一次
	onLaunch() {},
	//从后台进入前台
	onShow() {},
	//前台进入后台
	onHide() {},
	methods: {
		docheckrecord() {
			uni.navigateTo({
				url: '/pages/center/withdraw/withdrawRecord'
			});
		}
	}
};
</script>

<style lang="scss" scoped>
.withdrawResult {
	.resultbox {
		margin: 50rpx 0 96rpx;
		text-align: center;
		.result {
		}
	}
	.title {
		color: #101010;
		font-size: 28rpx;
		font-weight: 600;
	}
	.info {
		margin: 0 12px;
		.infodata {
			margin-top: 14rpx;
			.left {
				font-size: 26rpx;
				color: #919191;
			}
			.right {
				font-size: 26rpx;
				color: #101010;
			}
		}
	}
	.botfixed {
		width: 100%;
		text-align: center;
		position: fixed;
		left: 0;
		bottom: 0;
		bottom: constant(safe-area-inset-bottom);
		bottom: env(safe-area-inset-bottom);
	}
}
</style>
